package com.chat.chat.beans;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@ToString
@Accessors(chain = true)
@TableName("chat")
@AllArgsConstructor
@NoArgsConstructor
public class ChatVo {
    /**U
     * 发送者
     */
    @TableId(type = IdType.AUTO)
    private Integer idd;

    private Integer id;

//    接收者

    @TableField(value = "`to`")
    private Integer to;

//    消息
    private String msg;

 //类型  1 用户  2客服   3通知
    private String type;

    @JsonFormat(pattern = "HH:mm:ss" ,timezone = "GMT+8")
    private Date nowTime;

    @TableField(value = "`name`")
    private String name;

}

